package test10;

import java.util.function.Function;

/*

 */
public class Demo02 {
    public static void main(String[] args) {
        int result=method("林青霞,30",(str)->{
            String age=str.split(",")[1];
            return Integer.parseInt(age)+70;
        });
        System.out.println(result);
    }
    public static int method(String str,Function<String,Integer> function){
        return function.apply(str);
    }
}
